package com.gn.heavenpark.activity;

import android.app.Activity;
import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TabHost;
import android.widget.ViewFlipper;

public class Search extends TabActivity{

	
	Button searchPersonBtn, searchPointBtn, searchBtn;
	EditText searchEditText;

	
	
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.search);
		
		/*
		searchPersonBtn=(Button)findViewById(R.id.searchPersonBtn);
		searchPointBtn=(Button)findViewById(R.id.searchPointBtn);
		searchBtn=(Button)findViewById(R.id.searchBtn);
		
		searchBtn.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
			          Intent intent=new Intent(Search.this, HeavenParkInfo.class);
			          startActivity(intent);
			       
				
			}
		});
            */
		
		Intent person= new Intent(this, SearchPerson.class);
		Intent point = new Intent(this, SearchPoint.class);
		
		

		TabHost tabHost=(TabHost)findViewById(android.R.id.tabhost);
		//TabHost tabHost=getTabHost();
		tabHost.setup();
		TabHost.TabSpec spec;
		
		LayoutInflater layout=getLayoutInflater();
		
		
		
		
		spec=tabHost.newTabSpec("person");
		View vTab1 = layout.inflate(R.drawable.top_tab_person, null);
		// TextView textsample = (TextView)vTab1.findViewById(Rid.textsample);
		// textsmaple.setText("샘플1")ㅣ
		spec.setIndicator(vTab1);
		spec.setContent(person);
		tabHost.addTab(spec);
		
		spec=tabHost.newTabSpec("point");                                      //탭메뉴 이름
		View vTab2 = layout.inflate(R.drawable.top_tab_point, null);           //셋팅된 레이아웃 생성
		spec.setIndicator(vTab2);											      //탭에 레이아웃 담음
		spec.setContent(point);                                                   //탭에 컨텐츠 담음
		tabHost.addTab(spec);                                                     //탭 호스트에 탭메뉴를 얹는다
	
				
		tabHost.setCurrentTab(0);  //0번째 탭에을 처음으로 설정
	
		
		
	}
	
}
